﻿using Domain.Entity;
using Domain.Repository;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Application.AppService.EMRAppService
{
    public class EMRAppService : IEMRAppService
    {
        private readonly IEMRRepository emrRepository;

        public EMRAppService(IEMRRepository emrRepository)
        {
            this.emrRepository = emrRepository;
        }
        public Task<int> AddEMR(EMR emr)
        {
            return emrRepository.AddEMR(emr);
        }

        public Task<int> DeleteEMR(int Id)
        {
            return emrRepository.DeleteEMR(Id);
        }

        public Task<int> GetCount()
        {
            return emrRepository.GetCount();
        }

        public Task<List<EMR>> GetEMR()
        {
            return emrRepository.GetEMR();
        }

        public Task<List<EMR>> GetList(int page, int pageSize)
        {
            return emrRepository.GetList(page, pageSize);
        }

        public Task<int> UpdateEMR(EMR emr)
        {
            return emrRepository.UpdateEMR(emr);
        }
    }
}
